/**   
 * @Title: RebuildTicketDao
 * @Package com.isoftstone.industry.aaa.core.dao.assist
 * @Description: TODO
 * @Author Alvin
 * @Date Jun 26, 2014 10:21:14 AM
 * @version V1.0
 */
package com.isoftstone.industry.aaa.core.dao.assist;

import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import com.isoftstone.industry.persistance.bean.TicketRebuildTask;
import com.isoftstone.modules.core.persistence.IGenericDao;

/**
 * @ClassName: RebuildTicketDao
 * @Description: TODO
 * @Author Alvin
 * @Date Jun 26, 2014 10:21:14 AM
 */
public interface RebuildTicketDao extends IGenericDao<TicketRebuildTask, String> {
	
	@Query("select x from TicketRebuildTask x where x.chargingItemDetail.status = '0A' and x.nextRebuildTime <= ?1 and x.deleted = '0' and x.running = '0' order by x.nextRebuildTime asc")
	public List<TicketRebuildTask> getTicketRebuildTaskList(Date now, Pageable pageRequest);
	
}
